<template>
  <div class="main">
    <el-button type="primary" @click="dialogVisible = true" size="mini">查看</el-button>
    <el-dialog
        title="查看问题"
        :visible.sync="dialogVisible"
        width="30%"
        :before-close="handleClose">
<!--      <router-link to="/expertSelect" class="link">查询专家详细信息请点击此处</router-link>-->
      <el-input type="text" style="width: 50%;margin-bottom: 10px" :value="row.farmer.name"></el-input>
      <el-input type="textarea" :value="row.question"></el-input>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>

export default {
  name: "ShowQuestionForm",
  props:['row'],
  data() {
    return {
      dialogVisible: false,
    };
  },
  methods: {
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done();
        })
        .catch(_ => {});
    },
  },
}
</script>

<style scoped>
.main{
  width: 100%;
  margin: 10px;
  display: inline;
}

.link{
  position: absolute;
  top: 50px;
  margin-bottom: 30px;
}

.link:hover{
  color: dodgerblue;
  border-bottom: 1px solid dodgerblue;
}
</style>